<?php


namespace app\api\validate;

use think\Validate;

class Address extends Validate
{
    protected $rule =   [
        'address_name'  => 'require',
        'address_phone'  => 'require|mobile',
        'address_data'  => 'require',
        'address_street'  => 'require',
        'id'=>'require',
    ];

    protected $message  =   [
        'address_name.require' => '联系人不得为空',
        'address_phone.require' => '手机号不得为空',
        'address_data.require' => '省市区不得为空',
        'address_street.require' => '详细地址不得为空',
        'id.require' => 'id不得为空',
    ];

    protected $scene = [
        'add' => ['address_name','address_phone','address_data','address_street'],
        'edit' => ['address_name','address_phone','address_data','address_street', 'id']
    ];

}